<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PDA用户登陆</title>
<script src="${ctx}/resources/js/jquery-1.9.1.min.js" type="text/javascript"></script>
<style type="text/css">
body {
	font-size: 14px;
}

.batchInfo {
	color: blue;
	line-height: 20px;
}

.numLeft {
	font-weight: bold;
	color: red;
	font-size: 18px;
}
</style>
</head>
<body>
	<div class="bar">
		<table width="100%">
			<thead>
				<tr>
					<td style="color: blue;">
						<b>用户登录</b>
					</td>
				</tr>
			</thead>
			<form id="loginForm">
				<tr>
					<td width="60">用户名：</td>
					<td colspan="2">
						<input type="text" name="j_username" id="j_username" style="width: 100%;" />
					</td>
				</tr>
				<tr>
					<td width="60">密 码：</td>
					<td colspan="2">
						<input type="password" id="j_password" name="j_password" style="width: 100%;" />
					</td>
				</tr>
			</form>
			<tr>
				<td></td>
				<td>
					<input id="sumbitBtn" type="button" value="提交">
				</td>
			</tr>
		</table>
	</div>
	<script type="text/javascript">
		$(function() {
			$("#loginForm").submit(function() {
				return false;
			});
			$("#sumbitBtn").click(function() {
				if ($.trim($("#j_username").val()) == "" || $.trim($("#j_password").val()) == "") {
					return false;
				}
				var params = $("#loginForm").serialize();
				$.post("${ctx }/j_spring_security_check", params, function(r) {
					$.post("${ctx}/wap/pda/login", function(t) {
						if (t) {
							location.href = "${ctx}/wap/pda.jsp";
						}
					}, 'json');
				}, "html");
			});
		});
	</script>
</body>
</html>